package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.financing.wap.vo.admin.AdminUserComplainVO;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.DstUserComplainDTO;
import com.financing.wap.dao.IDstUserComplainDao;
import com.financing.wap.common.SqlName;
/**
 * dst_user_complain  
 * 用户投诉记录 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstUserComplainDao")
public class DstUserComplainDaoImpl extends BaseDaoImpl<DstUserComplainDTO, java.lang.Integer> implements IDstUserComplainDao {


	@Override
	public int insert(DstUserComplainDTO dstUserComplain) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstUserComplainSql.insert, dstUserComplain);
	}

	@Override
	public void update(DstUserComplainDTO dstUserComplain) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserComplainSql.update, dstUserComplain);
	}

	@Override
	public void updateForce(DstUserComplainDTO dstUserComplain) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserComplainSql.updateForce, dstUserComplain);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstUserComplainSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstUserComplainDTO> queryList(DstUserComplainDTO dstUserComplain) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstUserComplainSql.queryList, dstUserComplain);
	}

	@Override
	public int queryListCount(DstUserComplainDTO dstUserComplain) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstUserComplainSql.queryListCount, dstUserComplain);
	}

	@Override
	public DstUserComplainDTO loadById(Integer id) throws SQLException {
		return  (DstUserComplainDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstUserComplainSql.loadById,id);
	}

	@Override
	public int adminQueryListCount(AdminUserComplainVO userComplainVO) {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstUserComplainSql.adminQueryListCount, userComplainVO);
	}

	@Override
	public List<AdminUserComplainVO> adminQueryList(AdminUserComplainVO userComplainVO) {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstUserComplainSql.adminQueryList, userComplainVO);
	}

	@Override
	public Class<DstUserComplainDTO> getEntityClass() {
		return DstUserComplainDTO.class;
	}
 	
}
